]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
PolkitAgent: don't crash if there is no avatar
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 08:18:03 +0000 (10:18 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 16:40:05 +0000 (18:40 +0200)
If we're asking for root's password, we don't show an avatar. Don't
emit an exception in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=683707

js/ui/components/polkitAgent.js

index 0fa9ba449908aad0b76764f4d7aaf4350e3a6970..2f710df8493666c3b0c4f707d8ab973edff6060f 100644 (file)
@@ -299,7 +299,7 @@ const AuthenticationDialog = new Lang.Class({
     },
 
     _onUserChanged: function() {
-        if (this._user.is_loaded) {
+        if (this._user.is_loaded && this._userAvatar) {
             this._userAvatar.update();
             this._userAvatar.actor.show();
         }